import {exp, FileMultiple} from "../expressExt/exp";
import {Menu} from "../expressExt/Menu";
import {sdf} from "../expressExt/public/sdf";

@exp.multipart(form=> {
    form.hash = 'md5';
    form.encoding = 'utf-8';
    form.uploadDir = sdf.getTemp()
    // form.disableStrict = true;
    // form.maxFileSize = 1024;
    // form.checkFile = (name, file)=>file.type.indexOf("image") >= 0
})
export class TestFile {

    title = [];

    upload = exp.fileArray(r=>r.val.length > 0 && r.val.each(f=>f.size > 0), "无效文件");

    upload2 = exp.file(r=>r.val && r.val.size > 0)
}